const Router = require("koa-router");
const router = new Router({ prefix: "/bl-tag" });
const {
  queryTagList,
  modifyTag,
  addControll,
  queryTagByIdControl,
  deleteControl,
  deleteSelectControl,
} = require("../controller/tagController");
const {verifyQueryParams} = require("../middlewares/tag.middle")
const {verifyDeleteId,verifyDeleteIds} = require("../middlewares/cate.middle")
const {verifyToken} = require("../middlewares/auth.middle")

/**
 * @swagger
 * /bl-tag/queryTagList:
 *    post:
 *      tags:
 *        - Tags
 *
 * @swagger
 * /bl-tag/modify:
 *     post:
 *      tags:
 *          - Tags
 *
 * @swagger
 * /bl-tag/add:
 *      post:
 *         tags:
 *          - Tags
 *
 *
 * @swagger
 * /bl-tag/queryTagInfo:
 *   get:
 *     tags:
 *       - Tags
 * @swagger
 * /bl-tag/delete:
 *  post:
 *      tags:
 *       - Tags
 * 
 * @swagger
 * /bl-tag/deleteSelect:
 *  post:
 *      tags:
 *          - Tags
 */
router.post("/queryTagList",verifyQueryParams,queryTagList);
router.post("/modify", verifyToken,modifyTag);
router.post("/add", verifyToken,addControll);
router.get("/queryTagInfo", verifyToken,queryTagByIdControl);
router.post("/delete", verifyToken,verifyDeleteId,deleteControl);
router.post("/deleteSelect",verifyToken,verifyDeleteIds, deleteSelectControl);
module.exports = router;
